package com.eliza.library.ui.inter

import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
import androidx.navigation.compose.composable

interface IBaseRoute {
    val title: String
    val imageVector: ImageVector
    val content: @Composable (nav: NavHostController) -> Unit
}

data class AIBaseRoute(
    val title: String,
    val imageVector: ImageVector,
    val content: @Composable () -> Unit
)

interface INavScreen {
    fun RegisterRoute(navController: NavHostController, builder: NavGraphBuilder)
}

fun NavRegisterRouter(
    navController: NavHostController,
    builder: NavGraphBuilder,
    pages: List<IBaseRoute>,
) {
    pages.forEach { route ->
        // 显示添加导航参数 (参数列表)
        builder.composable(route.title) {
            route.content(navController)
        }
    }
}